package interfaces;

public class Employee implements Comparable<Employee> {

  private String name;
  private double salary;

  public Employee(String name, double salary) {
    this.name = name;
    this.salary = salary;
  }

  public String getName() {
    return this.name;
  }

  public double getSalary() {
    return this.salary;
  }

  public void raiseSalary(double percent) {
    this.salary *= (1 + percent / 100);
  }

  public int compareTo(Employee other) {
    return Double.compare(this.salary, other.salary);
  }
}
